// 基本类型
var str = 'string';
var num = 123;
var flag = true;
var und = undefined;
var nul = null;
// 联合类型
var phone = 123;
var obj = {
    age: 123,
    address: "string"
};
var info = {
    userName: "string",
    age: 20
};
// 枚举
// tsc index.ts
// enum Direction {
//     up,
//     down,
//     left,
//     right
// }
// type Dir = 'up' | 'down'
var Direction;
(function (Direction) {
    Direction["U"] = "up";
    Direction["D"] = "down";
    Direction["L"] = "left";
    Direction["R"] = "right";
})(Direction || (Direction = {}));
// console.log(Direction)
// 数组
var arr = [1, 2, 3];
var arr2 = [4, 5, 6];
// 元组 tuple
var arr3 = [1, '2'];
function echo(arg) {
    console.log(arg.length);
    return arg;
}
echo([1, 2, 3]);
